/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.envelopinfo.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 生成红包Entity
 * @author thinkgem
 * @version 2017-08-22
 */
public class EnvelopInfo extends DataEntity<EnvelopInfo> {
	
	private static final long serialVersionUID = 1L;
	private String envelopName;		// 红包名称
	private String envelopSort;		// 优先级
	private String productType;		// 支持产品类型
	private Date createTime;		// 创建时间
	private String field1;		// 扩展字段1
	private String field2;		// 扩展字段2
	private String field3;		// 扩展字段3
	
	public EnvelopInfo() {
		super();
	}

	public EnvelopInfo(String id){
		super(id);
	}

	@Length(min=0, max=255, message="红包名称长度必须介于 0 和 255 之间")
	public String getEnvelopName() {
		return envelopName;
	}

	public void setEnvelopName(String envelopName) {
		this.envelopName = envelopName;
	}
	
	@Length(min=0, max=11, message="优先级长度必须介于 0 和 11 之间")
	public String getEnvelopSort() {
		return envelopSort;
	}

	public void setEnvelopSort(String envelopSort) {
		this.envelopSort = envelopSort;
	}
	
	@Length(min=0, max=11, message="支持产品类型长度必须介于 0 和 11 之间")
	public String getProductType() {
		return productType;
	}

	public void setProductType(String productType) {
		this.productType = productType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Length(min=0, max=255, message="扩展字段1长度必须介于 0 和 255 之间")
	public String getField1() {
		return field1;
	}

	public void setField1(String field1) {
		this.field1 = field1;
	}
	
	@Length(min=0, max=255, message="扩展字段2长度必须介于 0 和 255 之间")
	public String getField2() {
		return field2;
	}

	public void setField2(String field2) {
		this.field2 = field2;
	}
	
	@Length(min=0, max=255, message="扩展字段3长度必须介于 0 和 255 之间")
	public String getField3() {
		return field3;
	}

	public void setField3(String field3) {
		this.field3 = field3;
	}
	
}